package com.jiayou.server

import com.jiayou.message.OnLineMessage
import io.netty.channel.Channel
import io.netty.channel.group.DefaultChannelGroup
import io.netty.util.concurrent.GlobalEventExecutor
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import java.util.concurrent.ConcurrentHashMap

/**
@author 李 双
@data   2020-11-19  13:19
@info
 */
@Configuration
open class ImServerConfig {

    @Bean
    open fun channelGroup() = DefaultChannelGroup(GlobalEventExecutor.INSTANCE)

//    @Bean
//    open fun users() = ConcurrentHashMap<OnLineMessage, Channel>()
}